<html>
<head>
<link rel="stylesheet" type="text/css" href="tree/ui/style/style.css" />
<script src='tree/tree.js' type='text/javascript'>
</script>
<script type='text/javascript'>
window.onload = function()
{
	using('tree.ui');
	var table = new Table(2, 2);
	var vbox = new VBox();
	var label = new Label('Hallo1');
	label.set_border_width(10);
	var label2 = new Label('Hallo2');
	var label3 = new Label('Hallo3');
	var button = new Button('Button');
	
	button.connect('clicked', function(widget, event)
	{
		store.append(['lanterns', 467]);
	});
	
	var store = new Store(
	{
		title: TYPES.string,
		year: TYPES.number
	});
	var lview = new Listview(store);
	var callback = function(widget, args)
	{
		console.log(widget.get_store().index(args.index));
	};
	lview.connect('row-activated', callback);
	
	vbox.add(label);
	vbox.add(label2);
	vbox.add(label3);
	
	var area = new Textview();
	area.connect('changed', function(widget, event)
	{
		console.log(event.value);
	});
	vbox.add(area);
	
	table.add(vbox, 0, 0);
	var label4 = new Label('label 4');
	table.add(label4, 1, 0);
	table.add(button, 1, 1);
	table.add(lview, 0, 1);
	var ret = table.show();
	document.body.appendChild(ret);
}
</script>
</head>
<body>
</body>
</html>
